/**
 * RemoteFileServiceClient.java
 */
package fss.remote.util;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;

import fss.common.communication.DownloadRequest;
import fss.common.communication.QueryResult;
import fss.common.communication.UploadRequest;
import fss.transfer.TransferId;
import fss.util.rmi.RmiId;

/**
 * The interface for the Remote Client that can interacts with a 
 * Remote File Service.
 * 
 * @author thinh
 *
 */
public interface RemoteFileServiceClient extends Remote {
    /**
     * The download resume logic for the Remote Client that interacts with a Remote File Service. 
     * @param transferId the download transfer identifier.
     * @throws RemoteException error invoking the the logic.
     */
    public void resume(TransferId transferId) throws RemoteException;
    /**
     * The upload logic for the Remote Client that interacts with a Remote File Service.
     * @param request the upload request.
     * @throws RemoteException error invoking the the logic.
     */
    public void upload(UploadRequest request) throws RemoteException;
    /**
     * The download logic for the Remote Client that interacts with a Remote File Service.
     * @param request the download request.
     * @throws RemoteException error invoking the the logic.
     */
    public void download(DownloadRequest request) throws RemoteException;
    /**
     * The query logic for the Remote Client that interacts with a Remote File Service.
     * @param registryId the registry iidentifier.
     * @param param the query string.
     * @return a list of query result(s).
     * @throws RemoteException error invoking the the logic.
     */
    public List<QueryResult> query(RmiId registryId, String param) throws RemoteException;
}
